	package VO;


	import java.util.Date;

import Po.Discount;


public class DiscountVO {





		Discount sup;
		
		public DiscountVO(Date startDate, Date endDate, Date startPresentDate,
				Date endPresentDate, int id,double discountRate) {
			sup = new Discount(new java.sql.Date(startDate.getTime()), new java.sql.Date(endDate.getTime()), 
					new java.sql.Date(startPresentDate.getTime()), new java.sql.Date(endPresentDate.getTime()), id, discountRate);
		}
		
		public Discount toDiscountPO(){
			return sup;
		}

		public static DiscountVO toDiscountVO(Discount e){
			return new DiscountVO(e.startDate,e.endDate,e.startPresentDate,e.endPresentDate,
					e.ID,e.discountRate);
		}

}
